package com.jzhao.jpre.channel.comm;

/**
 * The identity who owns the token.
 * This is a simple implementation
 * @author NT
 *
 */
public class IdentityToken {
	private String token;
	
	public boolean match(IdentityToken otherToken)
	{
		Object other;
		if((other = otherToken.getToken()) == null)
			return false;
		if(other.equals(getToken()))
			return true;
		return false;
			
	}
	
	public Object getToken() {
		return token;
	}

	public void setToken(Object token) {
		this.token = (String)token;
	}
	
	public String toString()
	{
		return token;
	}
}
